-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[blockly] Add more thing blocks #2562
Conversation
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
#1947 Bundle Size — 10.59MiB (+0.04%).Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
|
Current #1947 |
Baseline #1945 |
|
---|---|---|
Initial JS | 1.86MiB |
1.86MiB |
Initial CSS | 607.87KiB |
607.87KiB |
Cache Invalidation | 18.18% |
17.76% |
Chunks | 222 |
222 |
Assets | 245 |
245 |
Modules | 2873 |
2873 |
Duplicate Modules | 146 |
146 |
Duplicate Code | 1.84% |
1.84% |
Packages | 95 |
95 |
Duplicate Packages | 2 |
2 |
Bundle size by type 1 change
1 regression
Current #1947 |
Baseline #1945 |
|
---|---|---|
JS | 8.78MiB (+0.05% ) |
8.78MiB |
CSS | 890.63KiB |
890.63KiB |
Fonts | 526.1KiB |
526.1KiB |
Media | 295.6KiB |
295.6KiB |
IMG | 140.74KiB |
140.74KiB |
HTML | 1.24KiB |
1.24KiB |
Other | 871B |
871B |
Bundle analysis report Branch stefan-hoehn:blockly_getthings Project dashboard
I've noticed this too and agree. It's an unfortunate coincidence but I kind of blame OH for using the term "Item" the way it does in the first place instead of something less likely to conflict (Thing too). But since that choice was made long before even my time with OH, 🤷 . |
re "Thing". I understand why Thing was used -> Internet of Things, so I am happy with that. Wording is always difficult, I suppose. I would rather have hoped that blockly had chosen "element" instead of item ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me, thanks.
Just two things:
- I would rather name the get all Things block
oh_getthings
instead ofoh_things
because this is more inline withoh_getthing
. - Why do you have "complicated" code for the Thing attribute block? It also works with simpler code.
I will soon push my review changes for these two points, please have a look at them.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@stefan-hoehn, thanks a lot for your work! Two quick questions:
Am I using things wrongly? If yes, maybe others run into the same problem and this usage could be blocked in blockly?
|
For 1 I think you need to file a new issue. Be sure to also post the full rule from the code tab so we can see the XML that makes up the blocks, the JS that the blocks compiled to, and the full rule context. For 2 see https://community.openhab.org/t/thing-status-reporting-4-0-0-0-4-9-9-9/143180. Ultimately adding a new trigger would be an issue for core but this rule template can be used as is or as an example for how to work with the generic rule trigger in UI rules. |
Thanks. I just did here: #2670. |
Fixes #2552.
Add missing blocks to work with a thing or a group of things
Side note: I am aware that "for each item -> thing" doesn't really sound nice but it is a sad coincidence that the standard blockly for-block uses the word "item" which might be confusing. Changing this would imply a complete reimplementation of the standard block which IMHO is not worth the effort.